libxc: get and set soft and hard affinity
authorDario Faggioli <dario.faggioli@citrix.com>
Fri, 20 Jun 2014 16:19:01 +0000 (18:19 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 27 Jun 2014 12:38:32 +0000 (13:38 +0100)
commit6cc89d3101d8874e01a69a89a65736a2adfbd199
tree2ba1ae62022b0481dc8288e72b7d38517d4aeeef
parentd172e6b648f35c7f061a5fff351078ff3ff59e8a
libxc: get and set soft and hard affinity

by using the flag and the new cpumap arguments introduced in
the parameters of the DOMCTL_{get,set}_vcpuaffinity hypercalls.

Now, both xc_vcpu_setaffinity() and xc_vcpu_getaffinity() have
a new flag parameter, to specify whether the user wants to
set/get hard affinity, soft affinity or both. They also have
two cpumap parameters instead of only one. This way, it is
possible to set/get both hard and soft affinity at the same
time (and, in case of set, each one to its own value).

In xc_vcpu_setaffinity(), the cpumaps are IN/OUT parameters,
as it is for the corresponding arguments of the
DOMCTL_set_vcpuaffinity hypercall. What Xen puts there is the
hard and soft effective affinity, that is what Xen will actually
use for scheduling.

In-tree callers are also fixed to cope with the new interface.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xc_domain.c
tools/libxc/xenctrl.h
tools/libxl/libxl.c
tools/ocaml/libs/xc/xenctrl_stubs.c
tools/python/xen/lowlevel/xc/xc.c